/*
 * This file is part of Space Invaders: Rehash
 * Copyright (C)2007 Vicent Marti (tanoku@gmail.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef	_GAME_ALIEN_H_
#define	_GAME_ALIEN_H_

#include "SDL.h"
#include <stdio.h>
#include <string>
#include <vector>

#include "game.h"
#include "timer.h"
#include "main.h"
#include "sprites.h"
#include "game_const.h"

class Game;
class Player;
class Missile;

class Alien
{
	char m_numberStr[8];
	int m_number;
	int m_numberW;
	
	int m_color;
	
	int m_x;
	int m_y;
	
	int m_row;
	int m_col;
	
	bool m_hit;
	bool m_dead;
	bool m_tex2;
	bool m_boss;
	
	bool m_shot;
	int m_missile_x;
	int m_missile_y;
	
	int m_texId;
	
	SimpleTimer m_lifet;
	SimpleTimer m_blinkt;
	
	Game *m_parent;

public:
	Alien( Game *parent, int row, int col, int texid, int id );

	void render();
	void tick();
	void getBounds( SDL_Rect *r );
	bool hit( Missile *attacker );
	bool isDead() { return m_dead; }
	void shootTick();
	
	void setNumber( int num );
};


#endif
